<%-- 
    Document   : uploadfile
    Created on : May 25, 2012, 11:13:10 AM
    Author     : ems
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib prefix="rich" uri="http://richfaces.org/rich"%>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>

<link rel="stylesheet" type="text/css" href="../css/jquery.fancybox-1.3.4.css"/>
<link rel="stylesheet" type="text/css" href="../css/popup.css"/>
<link rel="stylesheet" type="text/css" href="../css/style.css"/>
<link rel="stylesheet" type="text/css" href="../css/uploadform.css"/>


<style type="text/css">
    body{
        background:none !important;
    }
    .uploadListClass table{
        height:20px !Important;
    }
    form{
        overflow: hidden;
    }
    .rich-fileupload-table-td {height:20px}

    #fancybox-outer {
        width:420px !important;
        height:245px !important;
    }
    .fields_input label{
        float:left;
        width: 80px;
        text-align: right;
    }

    .add_background{
        float:left;
        width:100%; 
        background-color: #D1E1F1; 
        padding-bottom: 7px;
        padding-top: 7px;

    }
    .fields_input{
        float: left;
        margin-left: -10px;
        margin-top: 6px !important;
        padding-left: 20px;
        width: 100%;
    }
    .div_upload{
        float:left;
        padding-left: 105px;
    }
    
</style>
<f:view>
    <a4j:form id="SERVICE_FORM" >
        <div class="popup" style="height:340px; width:550px; background: white;">

            <div class="popup-header">
                <div class="title"><h:outputText value="#{locale.attach_file}"/></div>

            </div>
            <div class="popup-content">
                <div class="main_content" style="padding:10px">

                    <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
                    <f:loadBundle basename="queenb.web.resources.jsfmessage" var="messages"/>
                    <h:inputHidden id="iduser"  value="#{uploadController.pn100}" />
                    <h:inputHidden id="fs200"  value="#{uploadController.fs200}" />
                    <h:inputHidden id="iduser2" value="#{uploadController.pm650}" />
                    <h:inputHidden id="iduser3" value="#{uploadController.isavata}" />
                    <h:inputHidden id="emp" value="#{uploadController.emp}" />
                    <div class="fields_input">
                        <label><h:outputText value="Thư mục" />:</label>
                        <h:selectOneMenu value="#{uploadController.ff000}">
                            <f:selectItems value="#{uploadController.listF000}" />
                            <a4j:support event="onchange" actionListener="#{uploadController.save}" />

                        </h:selectOneMenu>
                    </div>
                    <div class="fields_input add_background">
                        <label><h:outputText value="#{locale.description}"/>: </label>&nbsp;
                        <h:inputTextarea value="#{uploadController.mv651}" onfocus="if(this.value=='#{uploadController.mv651}')this.value='';"  style=" width:396px;height:26px;float:left; margin-left:4px"  >
                            <a4j:support event="onchange" actionListener="#{uploadController.save}" />

                        </h:inputTextarea>

                    </div>
                    <div class="fields_input div_upload" >
                        <rich:fileUpload id="uploadDoc1" style="width:100%;border:none;height:100%"
                                         onuploadcomplete="self.parent.location.href='#{uploadController.time}'"
                                         acceptedTypes="#{uploadController.type}"
                                         uploadControlLabel="#{locale.upload}"
                                         addControlLabel="#{locale.select_file}"
                                         clearAllControlLabel="#{locale.delete_all}"
                                         clearControlLabel="#{locale.delete}"
                                         cancelEntryControlLabel="#{locale.remove}"
                                         doneLabel=""
                                         sizeErrorLabel="#{locale.size_mismatch}."
                                         transferErrorLabel="#{locale.error_upload_process}"
                                         progressLabel="#{locale.uploading} ..."
                                         maxFilesQuantity="10"
                                         fileUploadListener="#{uploadController.uploadDocListener}"
                                         listHeight="93px"
                                         allowFlash="true"
                                         uploadListClass="uploadListClass">

                            <f:facet name="label">
                                <h:outputText value="#{locale.Uploaded} {_KB}#{locale.from_kb} {KB}KB --- {mm}:{ss}"></h:outputText>
                            </f:facet>
                            <f:param value="#{uploadController.pagereload}" name="page"/>
                            <f:param value="#{uploadController.table}" name="table"/>
                            <f:param value="#{uploadController.fs200}" name="fs200"/>
                            <f:param value="#{uploadController.pn100}" name="pn100"/>

                        </rich:fileUpload>

                    </div>


                </div>

            </div>
            <div class="popup-footer" style="">
                <div class="buttonsave" onclick="self.parent.tb_remove()"  ><span><h:outputText value="#{locale.close}"/></span></div>

            </div>
        </div>
    </a4j:form>
</f:view>








